package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.service.IGymCoachTypeService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GymCoachTypeMapper;
import com.ruoyi.system.domain.GymCoachType;
import com.ruoyi.common.core.text.Convert;

/**
 * 教练类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-22
 */
@Service
public class GymCoachTypeServiceImpl implements IGymCoachTypeService
{
    @Autowired
    private GymCoachTypeMapper gymCoachTypeMapper;

    /**
     * 查询教练类型
     * 
     * @param typeId 教练类型主键
     * @return 教练类型
     */
    @Override
    public GymCoachType selectGymCoachTypeByTypeId(Long typeId)
    {
        return gymCoachTypeMapper.selectGymCoachTypeByTypeId(typeId);
    }

    /**
     * 查询教练类型列表
     * 
     * @param gymCoachType 教练类型
     * @return 教练类型
     */
    @Override
    public List<GymCoachType> selectGymCoachTypeList(GymCoachType gymCoachType)
    {
        return gymCoachTypeMapper.selectGymCoachTypeList(gymCoachType);
    }

    /**
     * 新增教练类型
     * 
     * @param gymCoachType 教练类型
     * @return 结果
     */
    @Override
    public int insertGymCoachType(GymCoachType gymCoachType)
    {
        return gymCoachTypeMapper.insertGymCoachType(gymCoachType);
    }

    /**
     * 修改教练类型
     * 
     * @param gymCoachType 教练类型
     * @return 结果
     */
    @Override
    public int updateGymCoachType(GymCoachType gymCoachType)
    {
        return gymCoachTypeMapper.updateGymCoachType(gymCoachType);
    }

    /**
     * 批量删除教练类型
     * 
     * @param typeIds 需要删除的教练类型主键
     * @return 结果
     */
    @Override
    public int deleteGymCoachTypeByTypeIds(String typeIds)
    {
        return gymCoachTypeMapper.deleteGymCoachTypeByTypeIds(Convert.toStrArray(typeIds));
    }

    /**
     * 删除教练类型信息
     * 
     * @param typeId 教练类型主键
     * @return 结果
     */
    @Override
    public int deleteGymCoachTypeByTypeId(Long typeId)
    {
        return gymCoachTypeMapper.deleteGymCoachTypeByTypeId(typeId);
    }



}

